home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
UpTime Volume 1 #4
/
utv1n4s1.d64
/
water bomb
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-28
|
4KB
|
149 lines
10 rem title: waterbomb
20 rem author: george trepal
30 rem modified by: doug smoak
40 :
50 rem published by softdisk publishing inc.
60 :
80 if b=1 then 170
90 :
100 poke53280,0:poke53281,0: printchr$(142)chr$(8)
110 j=rnd(-ti)
120 print"[147] water bomb"
130 print" by george trepal"
140 print" wait about fifty seconds. the computer"
150 print" is loading words into its memory."
160 ifb=0thenb=1:load"com data",8,1
170 poke56,32:poke52,32
180 gosub190:goto240
190 tm$="[175][175][175][175][175][175][175]":bm$="[183][183][183][183][183][183][183]"
200 mm$="[170] [180] missed":return
210 :
220 tm$="[175][175][175][175][175]":bm$="[183][183][183][183][183]"
230 mm$="[170] [180] missed":return
240 ov$=""
250 vl=54296:wf=54276:hf=54273:lf=54272:ad=54277:sr=54278:pokevl,15
260 d$=""
270 ws$(0)="[169][169][169][169][169][169][169][169][169][146]":ws$(2)="[223][223][223][223][223][223][223][223][223][146]"
280 ws$(3)="[169][223][169][223][169][223][169][223][169][146]":ws$(1)="[223][169][223][169][223][169][223][169][223][146]"
290 br$=" [146]"
300 :
310 br$(1)=" [146]"
320 a$(0)=" [146][184] [146]"
330 a$(1)=" [146][184][184] [146]"
340 a$(2)=" [182][146][183][184][183] [146]"
350 a$(3)=" [146][183][184][184][183] [146]"
360 a$(4)=" [182][162][185][175][185][162] [146]"
370 a$(5)=" [162][185][175] [175][185][162] [146]"
380 a$(6)="[183][184][185][175] [175][185][146][184][183]"
390 :
400 b$(0)="[165][206][163][205] [206][163][205][167]"
410 e$(0)="[165] [172][160] [160][172] [167]"
420 n$(0)="[165][178] [209] [178][167]"
430 m$(0)="[165][202][192][195][195][195][192][203][167]"
440 b$(1)="[165][206][163][163] [163][163][205][167]"
450 e$(1)="[165] [188] [188] [167]"
460 n$(1)=n$(0)
470 m$(1)=m$(0)
480 b$(2)="[165][183][183][205] [206][183][183][167]"
490 e$(2)=e$(1)
500 n$(2)="[165] [209] [167]"
510 m$(2)=m$(0)
520 b$(3)=b$(1)
530 e$(3)="[165] [190][160] [190] [167]"
540 n$(3)=n$(2)
550 m$(3)="[165][192][195][195][195][192][192][192][167]"
560 b$(4)=b$(1)
570 e$(4)=e$(3)
580 n$(4)=n$(2)
590 m$(4)="[165][213][195][195][195][195][195][201][167]"
600 b$(5)="[165] [206][163] [163][205] [167]"
610 e$(5)="[165] [180][190] [188][170] [167]"
620 n$(5)=n$(2)
630 m$(5)="[165] [213][195][195][195][201] [167]"
640 b$(6)=b$(5)
650 e$(6)="[165] [180]> <[170] [167]"
660 n$(6)=n$(2)
670 m$(6)="[165] [195][195][195] [167]"
680 t$="[206][163][163][163][163][163][163][163][205]"
690 c$="[205][164][164][164][164][164][164][164][206]"
700 poke53280,5:poke53281,5
710 print"[147] select your skill level"
720 print"level 1: words longer than six letters and seven wrong guesses"
730 print"level 2: words of any length and seven wrong guesses"
740 print"level 3: words of any length and five wrong guesses"
750 print" press the 1, 2, or 3 key to select"
760 geti$:ifi$=""then760
770 ifval(i$)<1orval(i$)>3then760
780 pl=val(i$):ifpl=3thengosub220
790 poke53280,5:poke53281,15:ifpl<>3thengosub190
800 print"[147]"+d$+" [146]"
810 print" [146][169] [223] [146]":print" [146][169] [223] [146]"
820 print" [146][169] [223] [146]":print"[169] [223] [146]"
830 ps$=" [146]"
840 forj=1to11:printps$:next:printps$;
850 print""+ov$+tm$:printmm$:printov$+bm$
860 printd$+ov$+"mystery word"
870 print" guess the mystery word or get wet!"
880 gosub890:fl=1:goto960
890 print"[144]"+d$+d$+t$:printb$(n):printe$(n):printn$(n):printm$(n):printc$
900 ifpl=3andfl=1thenprint""+d$+a$(n+2):goto920
910 iffl=1thenprint""+d$+a$(n)
920 ifmf=0thenreturn
930 pokewf,17:pokead,20:pokesr,0:pokelf,75:forj=20to240step4:pokehf,j
940 next:pokewf,0
950 mf=0:return
960 print"":forj=1to6:printbr$(1):next
970 gosub1410
980 ifpl=1andlen(w$)<7then970
990 print""+d$+d$+ov$;:bl$="":forj=1tolen(w$):bl$="-"+bl$:next:printbl$:n=-1
1000 ct=ct+1:ifct/15=int(ct/15)thenws=ws+1:print""+ws$(wsand3)
1010 geta$:on-(a$="")goto1000:ifasc(a$)<65orasc(a$)>90then1000
1020 :
1030 rem compare input to word
1040 ft=0:forj=1tolen(w$):md$=mid$(w$,j,1):bs$=mid$(bl$,j,1)
1050 ifmd$=a$thenbs$=a$:ft=1:rem sound routine
1060 tp$=tp$+bs$:next
1070 bl$=tp$:tp$="":print""+d$+d$+ov$+bl$
1080 :
1090 ifft=0thenn=n+1:mf=1:gosub890:ml$=ml$+a$:print""+ov$+ml$
1100 ifn=6thenml$="":goto1150
1110 ifpl=3andn=4thenml$="":goto1150
1120 ifbl$=w$then1290
1130 poke198,0
1140 goto1010
1150 print"[144]"+d$+d$+ov$+w$
1160 ds$=" ":fs$="":fb$=""
1170 :
1180 pokewf,129:pokead,255:pokesr,255:pokehf,72:pokelf,169:pokevl,8
1190 :
1200 rem waterfall
1210 zz=fre(1)
1220 forj=1to16:fs$=fs$+"":printfs$+ds$:fb$=fb$+"":printfb$+br$:next
1230 printbr$+"[146]";:forj=1to6:fs$=fs$+"":printfs$+ds$:next:printds$;
1240 fs$="":fb$=""
1250 ford=1to70:next
1260 forj=15to0step-1:pokevl,j:pokewf,129:pokead,15:pokehf,40:pokelf,200:next
1270 pokewf,0:pokevl,15
1280 fl=0:n=0:goto1320
1290 :
1300 ml$=""
1310 n=0:fl=0
1320 print"[144]"+d$+d$+ov$+"press f7 for a"
1330 printov$+"new word or press"
1340 printov$+"f1 for a new level"
1345 printov$+"f8 for uptime";
1350 get a$:if a$="" then 1350
1355 if a$="[133]" then gosub 1380:goto 710
1360 if a$="[136]" then gosub 1380:goto 800
1365 if a$="[140]" then sys (8*4096)+4
1370 goto1350
1380 print""+d$+d$+ov$+" "
1390 printov$+" "
1400 printov$+" ";:return
1410 rem
1420 w$="":m=int(8196+rnd(1)*19180)
1430 m=m+1:ifpeek(m)<128then:goto1430
1440 m=m+1:a=peek(m)
1450 ifa>128thena=a-128:w$=w$+chr$(a):return
1460 w$=w$+chr$(a):goto1440